package com.genexususa.eo.bing.test.set;

import com.genexususa.eo.bing.connection.CampaignManager;
import com.genexususa.eo.bing.test.TestUtil;

public class ConsumeSetNegativeSitesToCampaigns {
    public static void main(String[] args) {
        TestUtil testUtil = new TestUtil();
        String campaignNegativeSitesCollectionXML =  "<Bing_CampaignNegativeSitesCollection xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                                            "\t<CampaignNegativeSites xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                                                "\t\t<GxCampaignId>984948891</GxCampaignId>\n" +
                                                                "\t\t<BingCampaignId>" + testUtil.campaignId1 + "</BingCampaignId>\n" +
                                                                "\t\t<NegativeSiteCollection>\n" +
                                                                    "\t\t\t<NegativeSite>www.hola.com</NegativeSite>\n" +
                                                                    "\t\t\t<NegativeSite>www.chau.com</NegativeSite>\n" +
                                                                "\t\t</NegativeSiteCollection>\n" +
                                                            "\t</CampaignNegativeSites>\n" +
                                                            "\t<CampaignNegativeSites xmlns=\"https://adcenter.microsoft.com/v8\">\n" +
                                                                "\t\t<GxCampaignId>984948892</GxCampaignId>\n" +
                                                                "\t\t<BingCampaignId>" + testUtil.campaignId2 + "</BingCampaignId>\n" +
                                                                "\t\t<NegativeSiteCollection>\n" +
                                                                    "\t\t\t<NegativeSite>www.mipagina.com</NegativeSite>\n" +
                                                                "\t\t</NegativeSiteCollection>\n" +
                                                            "\t</CampaignNegativeSites>\n" +
                                                        "</Bing_CampaignNegativeSitesCollection>";
        CampaignManager resource = new CampaignManager();
        System.out.println("Consuming SetNegativeSitesToCampaigns.....");
        String userName = testUtil.userName;
        String password = testUtil.password;
        String developerToken = testUtil.developerToken;
        long customerId = testUtil.customerId;
        long customerAccountId = testUtil.customerAccountId;
        String applicationId = testUtil.applicationId;
        long accountId = testUtil.accountId1;
        String result = resource.setNegativeSitesToCampaigns(customerAccountId, campaignNegativeSitesCollectionXML);
        System.out.println("Result:\n" + result);
    }
}
